package com.zhnc.dangjianpingtaiapp.gui.fragment;

import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;

import com.squareup.picasso.Picasso;
import com.youth.banner.Banner;
import com.youth.banner.BannerConfig;
import com.youth.banner.Transformer;
import com.youth.banner.loader.ImageLoader;
import com.zhnc.dangjianpingtaiapp.R;
import com.zhnc.dangjianpingtaiapp.argum.GridDataHelp;
import com.zhnc.dangjianpingtaiapp.argum.ListDataHelp;
import com.zhnc.dangjianpingtaiapp.gui.base.BaseFragment;

import java.util.ArrayList;

/**
 * @author wangdh
 * @time 2019/4/2 13:50
 * @describe
 */
public class HomeZhengWuFragment extends BaseFragment {
    private FrameLayout zhengwu_1;
    private FrameLayout zhengwu_2;
    private FrameLayout zhengwu_3;
    private FrameLayout zhengwu_4;

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return inflater.inflate(R.layout.fragment_home_zheng_wu, container, false);
    }


    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        zhengwu_1 = getView().findViewById(R.id.zhengwu_1);
        zhengwu_2 = getView().findViewById(R.id.zhengwu_2);
        zhengwu_3 = getView().findViewById(R.id.zhengwu_3);
        zhengwu_4 = getView().findViewById(R.id.zhengwu_4);

        ItemGridFragment itemGridFragment = new ItemGridFragment();
        itemGridFragment.setRely(GridDataHelp._zhengwu1(getActivity(), itemGridFragment));
        re(itemGridFragment, R.id.zhengwu_1);

        ItemGridFragment itemGridFragment2 = new ItemGridFragment();
        itemGridFragment2.setRely(GridDataHelp._zhengwu2(getActivity(), itemGridFragment2));
        re(itemGridFragment2, R.id.zhengwu_2);

        ItemListFragment itemListFragment = new ItemListFragment();
        itemListFragment.setRely(ListDataHelp.zhengwu3(getActivity(), itemListFragment));
        re(itemListFragment, R.id.zhengwu_3);
        ItemListFragment itemListFragment2 = new ItemListFragment();
        itemListFragment2.setRely(ListDataHelp.zhengwu4(getActivity(), itemListFragment2));
        re(itemListFragment2, R.id.zhengwu_4);


    }
}
